package edu.uow.devdocs

import grails.converters.*

class DeploymentController {
    static scaffold = true
	
	def ajaxGetDeployments(Integer id, String update) {
		def list = Deployment.findAllByProject(Project.get(id))
		def result = ['id':update, 'data':
		list.collect() {
			[
				id:it.id,
				description:it
			]
		}]
		render result as JSON
	}
	
	def showCost = {
		def deploymentInstance = Deployment.get(params?.id)
		render (view:'showCost', model:[deploymentInstance:deploymentInstance])
	}
}
